<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //声明一个数组
        const xiyou = ['ac', 've', 'ee'];
        //使用for..of 遍历数组
        for (let v of xiyou) {
            console.log(v); //ac ve ee
        }
        // 使用for..in遍历
        for (let v in xiyou) {
            console.log(v); //0 1 2
        }
    </script>
</body>

</html>